<template>
    <view>
        <view class="main">
            <u-parse :content="content"></u-parse>
        </view>
        <view class="footFen"></view>
        <view class="foot">
            <view class="submit" @click="onLine">立即联系</view>
            <view class="submit" @click="toDetail">套餐介绍</view>
        </view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                content:''
            }
        },
        onLoad() {
            this.content = this.$store.state.xieyi.box_des
        },
        methods: {
            toDetail() {
                uni.navigateTo({
                    url: `/pagesA/privateBox/detail`
                });
            },
            onLine(){
                uni.showModal({
                    title: '提示',
                    content: `如需预定包间，请电话联系工作人员，联系方式：${this.state.peizhi.wx_tel}`,
                    success: (res) => {
                        if (res.confirm) {
                            uni.makePhoneCall({
                                phoneNumber: this.state.peizhi.wx_tel //仅为示例
                            });
                        } else if (res.cancel) {
                            console.log('用户点击取消');
                        }
                    }
                });
            }
        }
    }
</script>
<style>
    page{
        background: #F0E8DC;
    }
</style>
<style lang="scss" scoped>
    .main{
        padding: 25rpx;
        font-size: 26rpx;
        color: #222;
    }
    .footFen{
        height: 120rpx;
        padding-bottom: constant(safe-area-inset-bottom);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .foot{
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 25rpx;
        display: flex;
        align-items: center;
        justify-content: space-around;
        background: #F0E8DC;
        padding-bottom: constant(safe-area-inset-bottom);
        padding-bottom: env(safe-area-inset-bottom);
        .submit{
            width: calc(50% - 30rpx);
            height: 70rpx;
            border-radius: 15rpx;
            background: rgba(140, 22, 8, 0.3);
            text-align: center;
            line-height: 70rpx;
            font-size: 28rpx;
            color: #8c1608;
        }
    }
</style>
